The present invention relates to a document reading device which creates image data by reading an image formed on a document, and more particularly, a document reading device capable of storing the thus created image data in an external memory that is detachably attached to the document reading device.
Some printers on the market today are equipped with a slot to which a record medium or external memory (e.g. , Compact Flash (registered trademark of SanDisk Corporation). Smart Media (registered trademark of Toshiba Corporation)) storing image data (shot by a digital camera, generated by a personal computer, etc.) can be attached. Such a printer having a memory slot is generally capable of reading the image data from the record medium attached to the slot and printing out the image data on paper etc. There also exist printers called “multifunctional printers”, in which a printer having such a memory slot is combined with a document reading device having a document reading (scanning) function. In such multifunctional printers, the user can attach/detach the record medium (external memory) from the slot freely.
Since the record medium can be removed from the slot at any time in such a multifunctional printer, there are cases where the user removes the record medium from the slot while image data is being read out from the record medium (for example, when the user does not know how to stop printing or got upset by noticing his/her misoperation after instructing the printer to read out image data from the record medium and print it out). Even in such a case, the image data stored in the record medium is rarely destroyed and no trouble occurs in most cases if the printer is executing simple data readout operation when the record medium is removed from the slot.
However, if the multifunctional printer to have an image data storing function (i.e., a function of storing image data in the record medium attached thereto), serious problems are expected to occur, that is, problems that are caused by the user's removal of the record medium from the slot while the multifunctional printer is writing some data to the record medium. In such cases, the record medium is detached from the slot in the midst of the rewriting or updating of the contents of the record medium, by which, in addition to the impossibility of continuing the image data storing as a natural consequence, the record medium itself might be destroyed (i.e., it becomes impossible to read/write data from/in the record medium anymore) at worst. As an example of the above image data storing function, some multifunctional printers have a function for storing image data in the record medium after reading a document by its document reading device such as a scanner. If the record medium is erroneously removed from the slot while the multifunctional printer is writing the image data to the record medium, the image data storing to the record medium can not be continued anymore. As a result, an error occurs to the multifunctional printer and the image data which has been read by the document reading device to some midpoint becomes unusable. Therefore, the document reading operation by the document reading device has to be conducted again from the beginning in order to store the image data of the document in the record medium. The rereading of the document has to be done from the first page of the document, taking a long time especially when the amount of the document is large, by which the usability of the multifunctional printer (document reading device) is deteriorated.